package com.party.admin.web.dto.output.mall;

import com.party.core.model.mall.MallGoodsWithAuthor;
import org.springframework.beans.BeanUtils;

/**
 * Created by wei.li
 *
 * @date 2017/8/16 0016
 * @time 18:15
 */
public class MallGoodsOutput extends MallGoodsWithAuthor {

    //二维码
    private String qrCodeUrl;

    private String price;

    private Long stock;

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public static MallGoodsOutput transform(MallGoodsWithAuthor mallGoodsWithAuthor){
        MallGoodsOutput mallGoodsOutput = new MallGoodsOutput();
        BeanUtils.copyProperties(mallGoodsWithAuthor, mallGoodsOutput);
        return mallGoodsOutput;
    }
}
